#!/usr/bin/perl

while ( <> ) {
	/create\s+table\s+(\S+)/i 		and push @a, "drop table $1 cascade;";
	/create\s+unique\s+index\s+(\S+)/i	and push @a, "drop index $1;";
	/create\s+index\s+(\S+)/i		and push @a, "drop index $1;";
	/create\s+view\s+(\S+)/i		and push @a, "drop view  $1;";
	/create\s+sequence\s+(\S+)/i		and push @a, "drop sequence  $1;";
}
print join $/, reverse @a;

